package com.rabbit.mq.listener;

import java.util.Map;

/**
 * @version V1.0.0
 * @ClassName: {@link QueueAckListener}
 * @Description: 队列监听器
 * @author: Lanzhou
 * @date: 2021/3/17 9:40
 * @Copyright:2020 All rights reserved.
 */

//@Component
//@RabbitListener(queues = "queueAck")
public class QueueAckListener {

    // @RabbitHandler
    public void process(Map<String, String> result) {
        try {
            Thread.sleep(3000L);
            for (Map.Entry<String, String> entry : result.entrySet()) {
                System.out.println(entry.getKey() + " = " + entry.getValue());
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }


}
